from typing import Optional
from pydantic import BaseModel

class AirportBase(BaseModel):
    Code: str
    Name: str
    CityName: str
    CityPinYin: str
    CounterAddress: Optional[str] = None
    CounterPhotoUrl: Optional[str] = None
    IsInternational: Optional[bool] = None
    EnglishName: Optional[str] = None

    class Config:
        from_attributes = True

class AirportCreate(AirportBase):
    pass

class Airport(AirportBase):
    AirportId: int
    FullName: str

    class Config:
        from_attributes = True 